<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
    <link href="resources/css/bootstrap.min.css" rel="stylesheet">
    <script src="resources/js/jquery.min.js"></script>
    <script src="resources/js/bootstrap.min.js"></script>
    <script src="resources/js/base.js"></script>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="resources/js/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
	<script type="text/javascript" src="resources/js/ztree/jquery.ztree.all-3.5.js"></script>
	<script type="text/javascript" src="resources/js/jquery.min.js"></script> 
<script type="text/javascript" src="resources/js/ztree/jquery.ztree.core-3.5.js"></script> 
<script type="text/javascript" src="resources/js/ztree/jquery.ztree.excheck-3.5.js"></script> 
<script type="text/javascript" src="resources/js/ztree/jquery.ztree.exedit-3.5.js"></script> 
<header>
      <nav class="navbar navbar-inverse ">
  <div class="container">
    <div class="navbar-header" id="navi">
      <a class="navbar-brand" href="#">C++</a>
    </div>
    <div class="collapse navbar-collapse">
      <ul class="nav navbar-nav" id="navi">
        <li><a href="#">首页</a></li>
		<li><a href="#">动态演示</a></li>
		<li><a href="coursewareview">在线课件</a></li>
		<li><a href="dataview">学习资料</a></li>
		<li><a href="bbslist">交流论坛</a></li>
        <li><a href="#">个人资料</a></li>
        <li><a href="#">作业提交</a></li>
        <li><a href="courselist">讲义管理</a></li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
      <c:if test="${empty username}">
    <a href="loginview" class="btn btn-primary" role="button">登陆</a>
    <a href="registerview" class="btn btn-primary" role="button">注册</a>
     </c:if> 
    <c:if test="${not empty username}">
      <p class="navbar-text navbar-right">欢迎你,<a href="#" class="navbar-link">${username }</a>,<a href="logout" class="navbar-link">登出</a></p>
    </c:if>
        </ul>
    </div>
  </div>
</nav>
</header>
<script type="text/javascript">
    //设置导航条高亮
    var nav = document.getElementById("navi");
    var links = nav.getElementsByTagName("li");
    var lilen = nav.getElementsByTagName("a"); //判断地址
    var currenturl = document.location.href;
    var last = 0;
    for (var i=0;i<links.length;i++)
    {
       var linkurl =  lilen[i].getAttribute("href");
         if(currenturl.indexOf(linkurl)!=-1)
            {
             last = i;
            }
    }
             links[last].className = "am-active";  //高亮代码样式
</script>